<?php

namespace app\api\controller;

use app\result\UpdateLogResult;
use app\result\UpdateResult;

class Update extends BaseIndex
{
    protected $unauthorized = ['update@check', 'update@web_version', 'update@update_log', 'update@wgt_version'];

    public function check()
    {
        data_exit_json((new UpdateResult())->check($this->param, $this->user_id));
    }

    public function web_version()
    {
        data_exit_json((new UpdateResult())->web_version($this->param));
    }

    public function update_log()
    {
        data_exit_json((new UpdateLogResult())->list($this->param));
    }

    public function wgt_version()
    {
        data_exit_json((new UpdateResult())->wgt_version($this->param));
    }

}
